<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg" %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
<style type="text/css">
A.nodec { text-decoration: none; }
</style>
</head>
<body>
<h1 class="pagetitle">物料列表</h1>

<a href="partsType.action">新增物料类别</a> <a href="parts.action">新增物料</a>


  <table class="bigtable">
  <tr><th>物料类别</th><th>物料名称</th><th>备注</th><th>--</th></tr>
  <s:iterator value="partsTypeList" status="pl">
  <tr <s:if test="#pl.even">class="tr-even"</s:if>>
  	<td><strong><s:property value="name"/></strong><br>
  	<a href="parts.action?parts.typeId=${id}">新增物料</a>
  	<s:if test="partsList == null || partsList.size() == 0">
  	<br>
  	<a href="partsType!modify.action?partsType.id=${id}">修改</a> 
  	<a href="partsType!delete.action?partsType.id=${id}">删除</a>
  	</s:if></td>
  	
  	<td colspan="3">
  		<table class="smalltable">
  			 <s:iterator value="partsList">
			<tr>
				<td><s:property value="name"/></td>
				<td><s:property value="remark"/></td>
				<td><a href="parts!modify.action?parts.id=${id}">修改</a> <a href="parts!delete.action?parts.id=${id}">删除</a></td>
			</tr>
			</s:iterator>
  		</table>
  	</td>
  </tr>
  </s:iterator>
  </table>

</body>
</html>